<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript" src="js/getNumbersWithCondition.js"></script>
</head>
<body>
<h1>测试</h1>

<script type="application/javascript">
    function condition(item) {
        return typeof item === 'number';
    }

    let array = [1, 3, 'h', 5, 'm', '4'];
    let result = getNumbersWithCondition(array, condition);
    console.log(result);
</script>
</body>
</html>